﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="tmppinglist.aspx.cs" Inherits="Com.Rivyer.Web.monitor.tmppinglist" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.2.Export, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView.Export" TagPrefix="dx" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Ping列表</title>
    <link href="../css/style.css" rel="stylesheet" type="text/css" />
    <link href="../css/rivcontent.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <%if (DesignMode)
      { %>
    <script type="text/javascript" src="../js/ASPxScriptIntelliSense.js"></script>
    <%} %>
    <script type="text/javascript">
        
    </script>
    <div>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td height="30">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td height="24" bgcolor="#353c44">
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td>
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td width="6%" height="19" valign="bottom">
                                                        <div align="center">
                                                            <img src="../images/tb.gif" width="14" height="14" /></div>
                                                    </td>
                                                    <td width="94%" valign="bottom">
                                                        <span class="STYLE1">Ping列表</span>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td align="center" style="font-size: 12px; width=100%">
                    <!--
                    <table cellpadding="0" cellspacing="15px" style="width: 630px; height: 550px">
                        <tr>
                            <td>
                            </td>
                        </tr>
                    </table>
                    <table border="0" cellpadding="10px" cellspacing="0" style="border: 1px solid #87adbf;vertical-align: top; text-align: center">
                        <tr>
                            <td>
                            $ ConnectionStrings:ITConnectionString
                            </td>
                        </tr>
                    </table>
                    内容页面
                    -->
                    <div id="rivcontent">
                        <div class="title">
                            Ping列表
                        </div>
                        <dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
                            KeyFieldName="id" Font-Size="12px" Width="800px" OnRowInserting="ASPxGridView1_RowInserting1">
                            <Columns>
                                <dx:GridViewCommandColumn VisibleIndex="0">
                                    <NewButton Visible="True">
                                    </NewButton>
                                    <DeleteButton Visible="True">
                                    </DeleteButton>
                                </dx:GridViewCommandColumn>
                                <dx:GridViewDataTextColumn FieldName="id" ReadOnly="True" VisibleIndex="1" Visible="False">
                                    <EditFormSettings Visible="False" />
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="username" VisibleIndex="2" Visible="False">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="description" VisibleIndex="3" Caption="描述">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="ip" VisibleIndex="4">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataDateColumn FieldName="latestpingdate" VisibleIndex="5" Caption="最近一次ping时间">
                                    <PropertiesDateEdit DisplayFormatString="yyMMdd HH:mm">
                                    </PropertiesDateEdit>
                                    <EditFormSettings Visible="False" />
                                </dx:GridViewDataDateColumn>
                                <dx:GridViewDataTextColumn FieldName="pingstatus" VisibleIndex="6" Caption="状态">
                                    <EditFormSettings Visible="False" />
                                </dx:GridViewDataTextColumn>
                            </Columns>
                            <SettingsPager PageSize="15">
                            </SettingsPager>
                            <Settings ShowFilterRow="True" ShowFilterRowMenu="True" />
                            <Styles>
                                <Header HorizontalAlign="Center">
                                </Header>
                                <Cell HorizontalAlign="Center">
                                </Cell>
                            </Styles>
                        </dx:ASPxGridView>
                        <table border="0" cellpadding="10px" cellspacing="0">
                            <tr>
                                <td>
                                    <dx:ASPxButton ID="ASPxButton3" runat="server" Text="Ping(较快)" OnClick="ASPxButton3_Click">
                                    </dx:ASPxButton>
                                </td>
                                <td>
                                    <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="加包:">
                                    </dx:ASPxLabel>
                                </td>
                                <td>
                                    <dx:ASPxSpinEdit ID="ASPxSpinEdit1" runat="server" Height="21px" MaxValue="65500"
                                        NullText="默认为0,使用默认包大小" NumberType="Integer">
                                    </dx:ASPxSpinEdit>
                                </td>
                                <td>
                                    <dx:ASPxButton ID="ASPxButton1" runat="server" Text="加包Ping连通监控(较慢)" OnClick="ASPxButton1_Click">
                                    </dx:ASPxButton>
                                </td>
                                <td>
                                    <dx:ASPxButton ID="ASPxButton2" runat="server" Text="清空Ping列表" OnClick="ASPxButton2_Click">
                                    </dx:ASPxButton>
                                </td>
                                <td>
                                    <dx:ASPxButton ID="ASPxButton4" runat="server" Text="下载数据" OnClick="ASPxButton4_Click">
                                    </dx:ASPxButton>
                                </td>
                                <td style="font-size: 12px">
                                    <a href="./tmppingstatus.aspx">转到ping状态列表
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
        </table>
    </div>
    <dx:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="ASPxGridView1">
    </dx:ASPxGridViewExporter>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ITConnectionString %>"
        DeleteCommand="DELETE FROM [tb_tmppinglist] WHERE [id] = @id" InsertCommand="INSERT INTO [tb_tmppinglist] ([username], [description], [ip], [latestpingdate], [pingstatus]) VALUES (@username, @description, @ip, @latestpingdate, @pingstatus)"
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM [tb_tmppinglist] WHERE ([username] = @username)"
        UpdateCommand="UPDATE [tb_tmppinglist] SET [username] = @username, [description] = @description, [ip] = @ip, [latestpingdate] = @latestpingdate, [pingstatus] = @pingstatus WHERE [id] = @id"
        OnSelecting="SqlDataSource1_Selecting">
        <DeleteParameters>
            <asp:Parameter Name="id" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="username" Type="String" />
            <asp:Parameter Name="description" Type="String" />
            <asp:Parameter Name="ip" Type="String" />
            <asp:Parameter Name="latestpingdate" Type="DateTime" />
            <asp:Parameter Name="pingstatus" Type="Int32" />
        </InsertParameters>
        <SelectParameters>
            <asp:SessionParameter Name="username" SessionField="username" Type="String" />
        </SelectParameters>
        <UpdateParameters>
            <asp:Parameter Name="username" Type="String" />
            <asp:Parameter Name="description" Type="String" />
            <asp:Parameter Name="ip" Type="String" />
            <asp:Parameter Name="latestpingdate" Type="DateTime" />
            <asp:Parameter Name="pingstatus" Type="Int32" />
            <asp:Parameter Name="id" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
    </form>
</body>
</html>
